import menu from './Menu.js';
import { mapGetters } from "vuex";

export default {
    name: 'Aside',
    data() {
        return {
            menu,
            collapseFlag: false
        }
    },
    computed: {
        ...mapGetters(["getChecked"])
    },
    methods: {
        // 折叠菜单
        collapse(){
            this.collapseFlag = !this.collapseFlag;
        },
        open(data){
            // 同样的地址，不能再次请求
            if (data.path !== this.$route.path){
                this.$router.push({path: data.path});
            }
        }
    },
    mounted() {

    }
}
